home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / secdrv.zip / SECDRV.DOC < prev    next >
Text File  |  1993-11-19  |  11KB  |  227 lines

  1. SecureDrive V1.0 Documentation
  2. Mike Ingle <mikeingle@delphi.com>
  3.  
  4. The code which I wrote is not copyrighted, but the program contains GNU
  5. Copylefted code, and therefore may be freely distributed under the terms of
  6. the GNU General Public Licence. See file COPYING for legalese.
  7.  
  8. All references to MD5 refer to:
  9. RSA Data Security, Inc. MD5 Message-Digest Algorithm
  10. (C) 1990, RSA Data Security
  11.  
  12. The IDEA(tm) block cipher is covered by a patent held by ETH and a Swiss
  13. company called Ascom-Tech AG.  The Swiss patent number is PCT/CH91/00117. 
  14. International patents are pending. IDEA(tm) is a trademark of Ascom-Tech AG.
  15. There is no license fee required for noncommercial use. Commercial users
  16. may obtain licensing details from:
  17. Dieter Profos, Ascom Tech AG, Solothurn Lab, Postfach 151, 4502 Solothurn,
  18. Switzerland, Tel +41 65 242885, Fax +41 65 235761.
  19.  
  20. Use this software at your own risk!
  21.  
  22. Send all comments and bug reports to <mikeingle@delphi.com>
  23.  
  24. Many people have sensitive or confidential data on their personal computers.
  25. Controlling access to this data can be a problem. PC's, and laptops in
  26. particular, are highly vulnerable to theft or unauthorized use. Encryption
  27. is the most secure means of protection, but is often cumbersome to use. The
  28. user must decrypt a file, work with it, encrypt it, and then wipe the
  29. plaintext. If encryption were easy, many more people would use it.
  30. SecureDrive is a step in this direction. SecureDrive automatically stores
  31. sensitive data on your DOS/Windows system in encrypted form.
  32.  
  33. SecureDrive allows you to create an encrypted partition on your hard drive.
  34. It also allows you to encrypt floppy disks. Encrypted partitions and disks
  35. become fully accessible when the TSR is loaded and the proper passphrase
  36. entered. The TSR takes only 2K of RAM. Encryption is performed at the sector
  37. level and is completely transparent to the application program. Everything
  38. on the disk or partition except the boot sector is encrypted. Encrypted
  39. floppy disks can be freely interchanged with unencrypted ones. Disks and
  40. partitions can be decrypted and returned to normal at any time.
  41.  
  42. SecureDrive uses the IDEA cipher in CFB mode for maximum data security. The
  43. MD5 hash function is used to convert the user's passphrase into a 128-bit
  44. IDEA key. The disk serial number, and track and sector numbers are used as
  45. part of the initialization to make each sector unique.
  46.  
  47. SecureDrive is made up of three program files. SECTSR is the memory-resident
  48. driver. CRYPTDSK is used to encrypt and decrypt floppy disks and hard drive
  49. partitions. LOGIN is used to unlock encrypted disks and partitions by
  50. loading the passphrase and disk parameters into the resident module.
  51.  
  52. Getting started instructions:
  53.  
  54. If you only have one hard drive partition (C:), you will have to repartition
  55. your hard drive if you want an encrypted partition. You can use encrypted
  56. floppies without changing your hard drive. You should create a partition
  57. large enough to hold all of your sensitive data. For this example, assume
  58. the partition is (D:). Put SECTSR, CRYPTDSK, and LOGIN in a directory which
  59. is in your PATH. (Not on the soon-to-be encrypted drive, of course!)
  60.  
  61. The partition can have data on it, or it can be blank. Run CRYPTDSK and
  62. select the drive letter. Enter a passphrase. CRYPTDSK will now encrypt the
  63. partition. It will skip bad sectors.
  64.  
  65. Now put in your AUTOEXEC.BAT, before the loading of any disk cache:
  66.  
  67. SECTSR
  68. LOGIN D: /S (assuming drive D:)
  69.  
  70. This will load the TSR and put it in "safe mode", preventing accidental
  71. access and damage to the encrypted drive. Reboot the system to make the
  72. changes take effect. Now type
  73.  
  74. LOGIN D: (again, assuming drive D:)
  75. and enter your passphrase. Your encrypted drive is now accessible.
  76.  
  77. To use an encrypted floppy, use CRYPTDSK to encrypt the floppy. Then run
  78. LOGIN /F
  79. and enter the passphrase. The encrypted floppy is now accessible. If you
  80. entered the wrong passphrase, access will fail with a drive not ready error.
  81.  
  82. Detailed instructions:
  83.  
  84. Creating an encrypted floppy disk:
  85.  
  86. Insert any DOS-formatted floppy disk. The disk may contain data, or it may
  87. be blank. Run CRYPTDSK. Select the floppy drive, and enter a passphrase. You
  88. will be required to enter the passphrase twice to confirm. CRYPTDSK will now
  89. encrypt the disk.
  90.  
  91. Accessing an encrypted floppy disk:
  92.  
  93. Load SECTSR, if it's not already loaded. Run LOGIN /F and enter the
  94. passphrase used to encrypt the disk. The disk is now accessible. You can
  95. swap disks at any time, as long as all of the disks are encrypted with the
  96. same passphrase. You can also access unencrypted disks; SECTSR switches on
  97. and off automatically. If you want to access a disk encrypted with a
  98. different passphrase, type LOGIN /F again and enter the new passphrase. The
  99. same passphrase applies to both floppy drives.
  100.  
  101. Decrypting a floppy disk:
  102.  
  103. Run CRYPTDSK. Select the floppy drive. CRYPTDSK will detect that the disk is
  104. encrypted, and will prompt you to decrypt it. Enter your passphrase.
  105. CRYPTDSK will now decrypt the disk.
  106.  
  107. Creating an encrypted hard drive partition:
  108.  
  109. You must have more than one partition, or more than one hard drive. If you
  110. encrypt your C: drive, you will not be able to boot from it! If this
  111. happens, decrypt it again to restore it. You should create a small D:
  112. partition, large enough to store as much sensitive information as you plan
  113. to keep on your hard drive. You can also run applications from the secure
  114. partition, but there will be some speed loss. Back up your hard drive before
  115. installing. Use FDISK to repartition your drive, and set up a small D:
  116. drive, which will become your secure partition. You can copy data to it
  117. before or after encryption. Run CRYPTDSK and select the letter of the
  118. partition you want to encrypt. CRYPTDSK will display the physical drive,
  119. head, and cylinder of the boot sector of this partition. You should verify
  120. these numbers. Then enter a passphrase to encrypt the partition. This will
  121. take a few minutes, depending on the size of the partition and your CPU.
  122.  
  123. Preventing damage to the secure partition, which could be caused by writing
  124. to it withot first logging in:
  125.  
  126. Load SECTSR. Run LOGIN D: /S to put the drive in safe mode. This should be
  127. done in AUTOEXEC.BAT. Writes will be locked out. A drive not ready error
  128. will occur if you attempt to access the encrypted drive. This will prevent
  129. DOS programs from reading the drive. Windows behaves rather pathologically:
  130. it retries the attempt about a dozen times, and then displays garbage. If
  131. this happens, just close the window, log in, and try again. The drive is
  132. still protected against writes in Windows.
  133.  
  134. Accessing an encrypted hard drive partition:
  135.  
  136. Load SECTSR, if it's not already loaded. Run LOGIN D: where D is replaced by
  137. the letter  of the encrypted partition. Type the passphrase. Your secure
  138. partition is now accessible. Note that only one secure partition can be
  139. accessible at a time. You can have encrypted floppies and a secure partition
  140. active simultaneously, but you can't have two secure partitions. The TSR
  141. only stores two cryptographic keys: one for the secure partition, and one
  142. for encrypted floppies.
  143.  
  144. Decrypting a hard drive partition:
  145.  
  146. Reboot to clear SECTSR out of memory. Run CRYPTDSK, select the drive letter,
  147. and enter the passphrase. CRYPTDSK will decrypt your partition.
  148.  
  149. Changing a passphrase:
  150.  
  151. Decrypt the disk with the old passphrase, and re-encrypt it with the new
  152. passphrase.
  153.  
  154. Clearing keys:
  155.  
  156. Typing LOGIN /C will erase the cryptographic keys from memory and disable
  157. encryption. You may then run LOGIN again to restore access. Note that this
  158. does not erase plaintext from memory; turn the computer off to do this.
  159.  
  160. Using a disk cache:
  161.  
  162. You can use a disk cache such as SMARTDRV.EXE or NCACHE to speed up access.
  163. The cache must be loaded after SECTSR is loaded. A .SYS cache will not work,
  164. because it is loaded before the TSR. If the cache is loaded first, it will
  165. cache ciphertext and provide little speedup. If the cache is loaded after
  166. SECTSR, it will cache plaintext and speed up access.
  167.  
  168. Hazards to avoid:
  169.  
  170. Writing to the encrypted partition or encrypted floppies without logging in.
  171. When you load the TSR and put it in safe mode, writes will be locked out.
  172. However, if you access an encrypted disk without loading the TSR, the disk
  173. can be destroyed. This happened to one of the beta testers. Use safe mode
  174. and load the TSR in AUTOEXEC to prevent it.
  175.  
  176. Forgetting your passphrase. With any lock, there is the hazard of losing the
  177. key. But cryptography is a special case because there are no locksmiths to
  178. save you. If you forget a passphrase, you're out of luck. That data is gone.
  179.  
  180. Using his program without backups. It accesses disks at the low level of the
  181. BIOS, and a program bug or an unfriendly interaction between the TSR and an
  182. application could scramble your hard drive permanently.
  183.  
  184. Exporting this program. This program is for use in the US and Canada only.
  185. Cryptography is export controlled, and sending this program outside the
  186. country may be illegal. Don't do it.
  187.  
  188. Potential security problems:
  189.  
  190. Data leaks: swapfiles and temporary files. Many application programs create
  191. swapfiles and temporary files all the time. If these files are written to a
  192. non-encrypted disk, they will expose your data. This can be avoided by
  193. putting the swapfiles and temporary files on the encrypted disk, but this is
  194. slow. The best solution is to use a RAM disk or cache the encrypted disk.
  195. There are also programs such as Norton WIPEINFO which will wipe empty space.
  196.  
  197. Trojans and viruses: someone could replace LOGIN with a hacked version, or
  198. install a specially written Trojan on your system, and capture your
  199. passphrase or key. Since the key remains in memory in the TSR, any program
  200. could potentially swipe it. The only sure way to prevent this is to make
  201. sure that nobody has the opportunity to install such a Trojan.
  202.  
  203. Passphrase guessing: if your passphrase is weak (a single word, monocase,
  204. with no punctuation is very weak) an attacker could try to guess it. This
  205. has proven highly effective against Unix login passwords. The best
  206. passphrase is a phrase which does not appear in text or literature.
  207.  
  208. Backups: must be encrypted. Use encrypted disks, or use an encrypting
  209. compression program such as HPACK and write the encrypted file onto the
  210. backup tape. Do not leave unencrypted disks or printouts lying around.
  211.  
  212. Source code and modifications:
  213.  
  214. SECTSR.ASM is the self-contained source for SECTSR. Use TASM and TLINK /T to
  215. assemble it.
  216.  
  217. CRYPTDSK uses SDCOMMON and CRYPT2.OBJ generated from CRYPT2.ASM. It also
  218. uses MD5.C, which is from the PGP23A source code.
  219.  
  220. LOGIN uses SDCOMMON and MD5.C.
  221.  
  222. The programs were compiled with Turbo C++. Compile them large model.
  223.  
  224. If you make any interesting modifications or improvements, send me mail and
  225. a copy of the new code. I hope this program will become popular and will be
  226. modified and improved by the net.
  227.